<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
	uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
	uri="http://richfaces.org/rich" prefix="rich"%><%@taglib
	uri="https://ajax4jsf.dev.java.net/ajax" prefix="ajax"%><%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Insert title here</title>
</head>
<body>
<div class="mainBackground">
	<div class="innerBackground">
<f:view locale="#{visitInfo.currentUser.locale}">
	<f:loadBundle basename="resources.VisionClickResources" var="msg"/>
	<jsp:include page="nav.jsp"/>
		<div class="table" style="width:960px;">
			<div class="tableHead" style="width:960px;">
				<h:form>
				<h:panelGrid columns="4" border="0" style="width:960px;">
					<h:outputText value="#{userStoryBean.userStory.userStoryName}"></h:outputText>
					<h:panelGroup style="float:right;">
						<h:commandLink value="#{msg.Abandon}" style="color:white;margin-right:5px;" action="#{userStoryBean.abandon}" rendered="#{visitInfo.currentUser.canCreateUserStory}" >
							<f:param value="#{userStoryBean.userStory.userStoryId}" name="userStoryId"/>
						</h:commandLink>
						<h:commandLink value="#{msg.Revise}" style="color:white;margin-right:5px;" action="changeuserstory" rendered="#{visitInfo.currentUser.canCreateUserStory}" >
							<f:param value="#{userStoryBean.userStory.userStoryId}" name="userStoryId"/>
						</h:commandLink>
						<h:commandLink value="#{msg.Depose }" style="color:white;margin-right:5px;" action="deposeuserstory" rendered="#{visitInfo.currentUser.canCreateUserStory}">
						</h:commandLink>
						<h:commandLink value="#{msg.CreateTask}" style="color:white;margin-right:5px;" action="create_task" rendered="#{visitInfo.currentUser.canCreateTask}">
							<f:param value="#{userStoryBean.userStory.userStoryId}" name="userStoryId"/>
						</h:commandLink>
						</h:panelGroup>
				</h:panelGrid>
				</h:form>
			</div>
			<h:panelGrid columns="2" style="width:800px;">
				<h:outputText value="#{msg.Creator}"></h:outputText>
				<h:outputText value="#{userStoryBean.userStory.creator }">
					<f:converter converterId="userConverter"/>
				</h:outputText>
				<h:outputText value="#{msg.CreateDate}"></h:outputText>
				<h:outputText value="#{userStoryBean.userStory.createDate}">
					<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/>
				</h:outputText>
				<h:outputText value="#{msg.Priority}"></h:outputText>
				<h:outputText value="#{userStoryBean .userStory.priority}">
				</h:outputText>
				<h:outputText value="#{msg.UserStoryDesc}"></h:outputText>
				<h:outputText value="#{userStoryBean.userStory.userStoryDesc}"/>
			</h:panelGrid>
				</div>

				<ajax:repeat value="#{userStoryBean.historyList}" var="userStory">
					<div class="table">
						<div class="tableHead"><h:outputText value="#{userStory.userStoryName}"></h:outputText></div>
						<h:panelGrid border="0" columns="2">
							<h:outputText value="#{msg.CreateDate}"></h:outputText>
							<h:outputText value="#{userStory.createDate}">
								<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/>
							</h:outputText>
							<h:outputText value="#{msg.Creator}"></h:outputText>
							<h:outputText value="#{userStory.creator}">
								<f:converter converterId="userConverter"/>
							</h:outputText>
							<h:outputText value="#{msg.Priority}"></h:outputText>
							<h:outputText value="#{userStory.priority}"></h:outputText>
							<h:outputText value="#{msg.UserStoryDesc}"></h:outputText>
							<h:outputText value="#{userStory.userStoryDesc}"></h:outputText>
						</h:panelGrid>
					</div>
				</ajax:repeat>



			</f:view>
</div>
</div>
</body>
</html>